#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>
#include"qbarserieswidget.h"
#include"qlineserieswidget.h"
#include"qcustomseriesWidget.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QObject::connect(ui->btnTest, &QPushButton::clicked, []() {
        QMessageBox::information(NULL,"提示","Button clicked!");});
    setCentralWidget(ui->tabWidget);

    QLineSeriesWidget* pLineSeries = new QLineSeriesWidget();
    QBarSeriesWidget* pBarSeries = new QBarSeriesWidget();
    QCustomSeriesWidget* pCustom = new QCustomSeriesWidget();


    ui->tabWidget->addTab(pLineSeries,QString("折线图"));
    ui->tabWidget->addTab(pBarSeries,QString("条形图"));
    ui->tabWidget->addTab(pCustom,QString("自定义"));


}

MainWindow::~MainWindow()
{
    delete ui;
}
